{extend name="user/layout" /}

{block name="title"}{$user.username ?: ''} 个人空间{/block}

{block name="main"}
<main role="main" class="d-flex flex-grow-1">
    <div class="d-flex main-wrap justify-content-between min-vh-100">
        <!-- 中间内容列 -->
        <div class="primary-col">
            <!-- 顶部导航条 -->
            <div class="breadcrumb d-flex align-items-center px-3 js-scroll">
                <div class="btn btn-sm btn-icon me-3 js-back" aria-label="返回" role="button" tabindex="0">
                    <i class="iconfont icon-left-arrow fs-5"></i>
                </div>
                <h2 class="flex-fill fs-18px fw-bold cursor-pointer js-top">
                    <span class="text-truncate">{$user.username}</span>
                </h2>
            </div>

            {include file="user/_user_cover"}
            {include file="user/_user_cover_nav"}

            {include file="layout/_list_baidu"}

            <!-- 分页 -->
            {:render_pagination($posts[1])}

            <!-- <div class="container p-1">
                <div class="row row-cols-3 gx-1 media-list d-flex align-items-center">
                    <div class="col"><img src="/static/img/5.jpg" alt=""></div>
                    <div class="col"><img src="/static/img/6.jpg" alt=""></div>
                    <div class="col"><img src="/static/img/7.jpg" alt=""></div>
                    <div class="col"><img src="/static/img/8.jpg" alt=""></div>
                    <div class="col"><img src="/static/img/9.jpg" alt=""></div>
                </div>
            </div> -->
        </div>
    </div>
</main>

{/block}

{block name="js"}
<script>
    document.addEventListener("DOMContentLoaded", () => {
        // 当前链接添加 active
        highlightActiveLink("user");
        document.getElementById("my-post").classList.add('active');
        updateIconClassOnActive('.app-link', 'icon-user', 'icon-user-fill');
    });
</script>
{/block}